import Vue from 'vue'
import Vuex from 'vuex'
// import axios from '@/libs/axios'
// import api from '@/libs/api'

Vue.use(Vuex)

const state = {
  funPositions: []
}

const mutations = {
  // updateFunPositions (state, val) {
  //   state.funPositions = val || {}
  // }
}

const actions = {
  // getFunPositions ({ commit, state }) {
  //   return new Promise((resolve, reject) => {
  //     axios.post(api.GetFunPositionDisView).then(res => {
  //       if (res.Code === 0 || res.Code === 1) {
  //         commit('updateFunPositions', res.Data)
  //         resolve(res)
  //       } else {
  //         commit('updateFunPositions', {})
  //         reject(res)
  //       }
  //     }).catch(err => reject(err))
  //   })
  // }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
